package com.jfs.qy.exception;


import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理类
 */
@RestControllerAdvice
@Slf4j
public class GloableExecption {
    @ExceptionHandler(value = Exception.class)
    @ResponseStatus(HttpStatus.OK)
    public void unKnowExceptionHandler(Exception e) {
        log.error(e.getMessage());
        e.printStackTrace();
    }

}
